﻿using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
using System.Web;

namespace FlightService
{
    /// <summary>
    /// Interface for flight algorithms
    /// </summary>
    public interface IAlgorithm
    {
        /// <summary>
        /// List of Flights from client's request
        /// </summary>
        List<Flight> RequestedFlights { get; }

        /// <summary>
        /// Executes the algorithm
        /// </summary>
        /// <param name="request">Request object</param>
        /// <param name="cnn">Connection to the database</param>
        /// <returns>String with response</returns>
        string Execute(Request request, SqlConnection cnn);

        /// <summary>
        /// Executes the algorithm
        /// </summary>
        /// <param name="request">Request object</param>
        /// <param name="filepath">Path to the file with database</param>
        /// <returns>String with response</returns>
        string Execute(Request request, string filepath);
    }
}